<form action="{:sysuri()}" method="post" data-auto="true" class="layui-form layui-card">

    <div class="layui-card-body padding-left-40">
        <div class="layui-row layui-form-item layui-col-space15">
            <label class="layui-col-xs3">
                <span class="help-label"><b>提现状态</b></span>
                {if $vo.audit_status eq 0}
                <input class='layui-input layui-disabled layui-bg-gray' disabled value='审核中'>
                {elseif $vo.audit_status eq 1/}
                <input class='layui-input layui-disabled layui-bg-gray' disabled value='待打款'>
                {elseif $vo.audit_status eq 2/}
                <input class='layui-input layui-disabled layui-bg-gray' disabled value='已打款'>
                {else/}
                <input class='layui-input layui-disabled layui-bg-gray' disabled value='已驳回'>
                {/if}
            </label>
            <label class="layui-col-xs3">
                <span class="help-label"><b>审核时间</b></span>
                <input class='layui-input layui-disabled layui-bg-gray' disabled value='{$vo.audit_datetime}'>
            </label>
            <label class="layui-col-xs3">
                <span class="help-label"><b>打款时间</b></span>
                <input class='layui-input layui-disabled layui-bg-gray' disabled value='{$vo.trade_time}'>
            </label>
            {notempty name="vo.path"}
            <label class="layui-col-xs3">
                <span class="help-label"><b>打款凭证</b></span>
                <img src="{$vo.path}" width="100" data-tips-hover data-tips-image data-lazy-src="{$vo.path}">
            </label>
            {else/}
            <label class="layui-col-xs3">
                <span class="help-label"><b>申请时间</b></span>
                <input class='layui-input layui-disabled layui-bg-gray' disabled value='{$vo.create_at}'>
            </label>
            {/notempty}
        </div>
        <div class="layui-row layui-form-item layui-col-space15">
            <label class="layui-col-xs3">
                <span class="help-label"><b>提现单号</b></span>
                <input class='layui-input layui-disabled layui-bg-gray' disabled value='{$vo.code|default="-"}'>
            </label>
            <label class="layui-col-xs3">
                <span class="help-label"><b>提现金额</b></span>
                <input class='layui-input layui-disabled layui-bg-gray amount' disabled value='0'>
            </label>
            <label class="layui-col-xs3">
                <span class="help-label"><b>提现手续费</b></span>
                <input class='layui-input layui-disabled layui-bg-gray check_amount' disabled value='0'>
            </label>
            <label class="layui-col-xs3">
                <span class="help-label"><b>应打款金额</b></span>
                <input class='layui-input layui-disabled layui-bg-gray nowamount' disabled value='0'>
            </label>
        </div>
        <div class="layui-form-item">
            <label class="relative block">
                <span class="color-green font-w7">提现描述</span>
                <textarea class="layui-textarea" name="remark" disabled placeholder="请输入提现描述">{$vo.remark|default=''}</textarea>
            </label>
        </div>
        <!-- 线下转账到银行卡账户 -->
        <div class="layui-row layui-form-item layui-col-space15">
            <label class="layui-col-xs3">
                <span class="color-green font-w7">开户银行名称</span>
                <input class='layui-input layui-disabled layui-bg-gray' disabled value='{$vo.bank_name|default="-"}'>
            </label>
            <label class="layui-col-xs3">
                <span class="color-green font-w7">开户分行名称</span>
                <input class='layui-input layui-disabled layui-bg-gray' disabled value='{$vo.bank_bran|default="-"}'>
            </label>
            <label class="layui-col-xs3">
                <span class="color-green font-w7">开户账号姓名</span>
                <input class='layui-input layui-disabled layui-bg-gray' disabled value='{$vo.bank_user|default="-"}'>
            </label>
            <label class="layui-col-xs3">
                <span class="color-green font-w7">开户银行卡号</span>
                <input class='layui-input layui-disabled layui-bg-gray' disabled value='{$vo.bank_code|default="-"}'>
            </label>
        </div>
        <div class="layui-form-item">
            <label class="relative block">
                <span class="color-green font-w7">审核操作描述</span>
                <textarea class="layui-textarea" name="audit_remark" placeholder="请输入审核描述" {if $from eq 1}disabled{/if}>{$vo.audit_remark|default=''}</textarea>
            </label>
        </div>
    </div>
    <div class="hr-line-dashed"></div>
    <input name='audit_status' type='hidden' value='{$vo.audit_status}'>
    <input name='type' type='hidden' value=''>
    {notempty name='vo.code'}<input name='code' type='hidden' value='{$vo.code}'>{/notempty}
    {if $from eq 0}
        <div class="layui-form-item text-center">
            <button class="layui-btn ok" type='button'>审核通过</button>
            <button class="layui-btn truesubmit" style="display:none;" type='submit'>审核通过</button>
            <button class="layui-btn layui-btn-warm refuse" type='button'>驳回申请</button>
        </div>
    {/if}
</form>
<script>
    $(function(){
        $(".refuse").unbind().on('click',function (){
            $("input[name='type']").val(0);
            $(".truesubmit").trigger('click');
        })
        $(".ok").unbind().on('click',function (){
            $("input[name='type']").val(1);
            $(".truesubmit").trigger('click');
        })
        let amount = "{$vo.amount}"
        let charge_amount = "{$vo.charge_amount}"
        let now_amount = Number(amount) - Number(charge_amount)
        $(".amount").val(Number(amount/100))
        $(".check_amount").val(Number(charge_amount/100))
        $(".nowamount").val(Number(now_amount/100))
    })
</script>
